package com.gxg.service.Impl;

import com.gxg.common.redis.JedisClient;
import com.gxg.dao.XUserDao;
import com.gxg.pojo.XUserEntity;
import com.gxg.pojo.XUserExample;
import com.gxg.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by guxiaoguang on 2018/4/25.
 */
@Transactional
@Service
public class LoginServiceImpl implements LoginService {


    @Autowired
    private XUserDao xUserDao;

    @Autowired
    private JedisClient jedisClient;

    @Override
    public List<XUserEntity> selectUserByName(String name) {
        XUserExample xUserExample = new XUserExample();
        XUserExample.Criteria xUserExampleCriteria = xUserExample.createCriteria();
        xUserExampleCriteria.andNameEqualTo(name);
        List<XUserEntity> xUserEntities = xUserDao.selectByExample(xUserExample);
        return xUserEntities;
    }


}
